package cn.imvc.app.repositories;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;

import cn.imvc.app.entities.Cart;

public interface CartRepository extends JpaRepository<Cart, Integer> {
	List<Cart> findByMemberIdAndIsBuy(Integer memberId, Byte isBuy);

	Cart findByMemberIdAndSkuIdAndIsBuy(Integer memberId, Integer skuId, Byte isBuy);

	Cart findByMemberIdAndSkuId(Integer memberId, Integer skuId);

	List<Cart> findByMemberId(Integer memberId);
	
	void deleteById(Integer id);

}
